package com.duapk.search.bean;

import org.apache.lucene.search.function.DocValues;

/**
 * 索引信息
 * 
 * @Package: com.duapk.search.bean
 * @ClassName: IndexBrief
 * @author: jiangzheng
 * @date: Jun 7, 2011 1:36:00 PM
 * 
 */
public class IndexBrief {

	private DocValues nameIDs;

	private DocValues stars;

	public int getNameID(int doc) {
		try {
			return nameIDs.intVal(doc);
		} catch (ArrayIndexOutOfBoundsException e) {
			return 0;
		}
	}

	public float getStar(int doc) {
		try {
			return stars.floatVal(doc);
		} catch (ArrayIndexOutOfBoundsException e) {
			return 0;
		}
	}

	public void setNameIDs(DocValues nameIDs) {
		this.nameIDs = nameIDs;
	}

	public void setStars(DocValues stars) {
		this.stars = stars;
	}

}
